package com.study.studyInstance;

public class TestOverride {
    public static void main(String[] args) {
        new Flower().show();
        new Rose().show();
    }
}
class Flower{
    int age = 10;
    public void show(){
        System.out.println("Flower is beautiful");
    }
    int getAge(){
        return this.age;
    }

}
class Rose extends Flower{
    public void show(){
        System.out.println("Rose is beautiful");
    }
    protected int getAge(){
        return this.age;
    }
}